package com.study.business.configure;

import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class RabbitMQConfig {

    private final String LOG_QUEUE = "log_queue";
    private final String LOG_EXCHANGE = "log_exchange";

    @Bean
    public Queue logQueue() {
        return new Queue(LOG_QUEUE, true, false, false);
    }

    @Bean
    public Exchange logExchange() {
        return new TopicExchange(LOG_EXCHANGE);
    }

}

